#include <bits/stdc++.h>
#include <iostream>
using namespace std;

double round(double x) //四舍五入
{
    if (x<0.05 && x>-0.05)
        return 0;
    else
        return x;
}
int main() {
    double a1, b1, a2, b2;
    cin>>a1>>b1>>a2>>b2;
    std::complex<double> c1(a1,b1);
    std::complex<double> c2(a2, b2);
    //加法
    std::complex<double> sum = c1 + c2;
    printf("(%.1f%+.1fi) + (%.1f%+.1fi) = ",a1,b1,a2,b2);
    if (round(a1+a2)==0){
        if (round(b1+b2)==0){
            printf("0.0");
        } else{
            printf("%.1fi",sum.imag());
        }
    } else{
        if (round(b1+b2)==0){
            printf("%.1f",sum.real());
        } else{
            printf("%.1f%+.1fi",sum.real(),sum.imag());
        }
    }
    printf("\n");
    //减法
    std::complex<double> diff = c1 - c2;
    printf("(%.1f%+.1fi) - (%.1f%+.1fi) = ",a1,b1,a2,b2);
    if (round(a1-a2)==0){
        if (round(b1-b2)==0){
            printf("0.0");
        } else{
            printf("%.1fi",diff.imag());
        }
    } else{
        if (round(b1-b2)==0){
            printf("%.1f",diff.real());
        } else{
            printf("%.1f%+.1fi",diff.real(),diff.imag());
        }
    }
    printf("\n");
    //乘法
    std::complex<double> product = c1 * c2;
    printf("(%.1f%+.1fi) * (%.1f%+.1fi) = ",a1,b1,a2,b2);
    if (round(product.real())==0){
        if (round(product.imag())==0){
            printf("0.0");
        } else{
            printf("%.1fi",product.imag());
        }
    } else{
        if (round(product.imag())==0){
            printf("%.1f",product.real());
        } else{
            printf("%.1f%+.1fi",product.real(),product.imag());
        }
    }
    printf("\n");
    //除法
    std::complex<double> quotient = c1 / c2;
    printf("(%.1f%+.1fi) / (%.1f%+.1fi) = ",a1,b1,a2,b2);
    if (round(quotient.real())==0){
        if (round(quotient.imag())==0){
            printf("0.0");
        } else{
            printf("%.1fi",quotient.imag());
        }
    } else{
        if (round(quotient.imag())==0){
            printf("%.1f",quotient.real());
        } else{
            printf("%.1f%+.1fi",quotient.real(),quotient.imag());
        }
    }

    return 0;
}